Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

177
Vistas
React Confirm Alert library showing "Warning: ReactDOM.render is no longer supported in React 18."

I'm trying to use the react-confirm-alert library for a confirmation dialog. But it's giving me a warning when the confirmation pop-up is opening for the react version upgrade. "Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17." Is there any way to get rid of the warning? Or is there any good alternative library that I can use for a confirmation dialog?

Thank you!

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Try this:

import ReactDOM from 'react-dom/client';

then

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);

It will work

about 4 years ago · Juan Pablo Isaza Denunciar

0

Probably your answer must be:

Try this in your index file:

import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";

const rootElement = document.getElementById("root");
const root = ReactDOM.createRoot(rootElement);

root.render(
        <App />
        );

This works in latest react version.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda